ip/ffmpeg: don't process empty frames
authorihy123 <aladinandreyy@gmail.com>
Sun, 17 Aug 2025 16:22:50 +0000 (19:22 +0300)
committerSebastian Ramacher <sramacher@debian.org>
Fri, 12 Sep 2025 21:00:35 +0000 (23:00 +0200)
Gbp-Pq: Name 0012-ip-ffmpeg-don-t-process-empty-frames.patch

ip/ffmpeg.c

index af6ecfb8d81dec8318a90941cabd638fac59c0ad..dd9061abab775e4f8971e044190c958f8ad4300d 100644 (file)
@@ -356,7 +356,7 @@ static int ffmpeg_get_frame(struct ffmpeg_private *priv)
                priv->curr_duration += priv->pkt->duration;
 
                res = avcodec_send_packet(priv->codec_ctx, priv->pkt);
-               if (res == AVERROR(EAGAIN))
+               if (res == 0 || res == AVERROR(EAGAIN))
                        return 0;
        }
        if (res < 0)